package com.luanye.enjoy.config;

import lombok.AllArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import java.util.concurrent.Executor;

@Configuration
@EnableAsync
@AllArgsConstructor
public class AsyncThreadConfig implements AsyncConfigurer {

    private final Executor taskPool;

    @Override
    public Executor getAsyncExecutor() {
        return taskPool;
    }


}
